package com.zhouxiaoge.jenkins.core.service;

import com.offbytwo.jenkins.model.Computer;
import com.offbytwo.jenkins.model.JobWithDetails;

import java.util.Map;

/**
 * @author 周明阳
 * @date 2019/7/18 09:35
 * @description Jenkins Job管理
 */


public interface JenkinsManageJobService {

    /**
     * 获取Jenkins的Job集合
     */
    Map<String, Computer> acquireJobs();

    /**
     * 创建构建
     */
    void createBuild(String jobName, String jobDescribe);

    /**
     * 修改构建内容
     */
    void updateBuildJob(String jobName, String jobDescribe);

    /**
     * 执行构建
     */
    void executeBuildJob(String jobName);

    /**
     * 获取备注
     */
    JobWithDetails acquireRemarks(String jobName);

    /**
     * 获取控制台输出
     */
    String acquireConsoleOutput(String jobName);
}
